package com.example.messageboard.service;

import com.example.messageboard.mapper.MessageInfoMapper;
import com.example.messageboard.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-12-09
 * Time: 18:33
 */
@Service
public class MessageService {
    @Autowired
    private MessageInfoMapper messageInfoMapper;
    public Integer publishMessage(MessageInfo messageInfo){
        return messageInfoMapper.insertMessage(messageInfo);
    }
    public List<MessageInfo> getMessageList(){
        return messageInfoMapper.selectAllList();
    }
}
